package com.kingbook.core.scripting.nodes;


import org.jdom2.Element;

import java.util.Map;

/**
 * @Author: Bucky
 * @Date: 2019/1/2
 * @Version 1.0
 */
public class IncludeNode implements Node {

    private String refid = "";

    IncludeNode(Element element) {
        refid = element.getAttributeValue("refid");
    }

    @Override
    public String getSql(Map<String, ?> paramMap, Map<String, SegmentNode> segMap) {
        return segMap.get(refid).getSql(paramMap, segMap);
    }
}
